
ISI=[5 10 20 30 50 100]

%MF PPR
CCs=[3.933040477	3.264725498	3.082458295	nan	1.39674271	1.194499225
1.001412889	0.884148213	1.252764733	0.826051269	0.881120917	0.759787061
1.151331548	1.165494975	1.049447978	0.877158901	0.863543726	0.952544528
2.028595	1.771456	1.79489	1.033318	0.8723323	0.9689436
nan	0.774	0.898	nan	0.71	0.79
nan	1.0899	0.8263	nan	0.9504	0.542
nan	nan	0.9436	nan	nan	nan]



%anoying plotting lines bc of different ISI per cell.
figure;plot([5 10 20 50 100],[3.933040477	3.264725498	3.082458295	1.39674271	1.194499225],'color',[0 0 0 0.5])
hold on
plot([5 10 20 30 50 100],[1.001412889	0.884148213	1.252764733	0.826051269	0.881120917	0.759787061],'color',[0 0 0 0.5])
plot([5 10 20 30 50 100],[1.151331548	1.165494975	1.049447978	0.877158901	0.863543726	0.952544528],'color',[0 0 0 0.5])
plot([5 10 20 30 50 100],[2.028595	1.771456	1.79489	1.033318	0.8723323	0.9689436],'color',[0 0 0 0.5])
plot([10 20 50 100],[0.774	0.89	0.71	0.79],'color',[0 0 0 0.5])
plot([10 20 50 100],[1.0899	0.8263 0.9504	0.542],'color',[0 0 0 0.5])

plot(ISI,nanmean(CCs,1),'color',[199 34 22]/255, 'linewidth',2)

temp=gca;
ylim([0 temp.YLim(2)]);
xlim([0 100]);
Ytick2=temp.YLim(2);
set(gca, 'YTick', [0:1:Ytick2 ])
% set(gca, 'YTick', [0:Ytick2/3:Ytick2 ]);
yticklabels({0,'','','',Ytick2})
set(gca, 'XTick', [5 10 20 30 50 100])
set(gcf,'color','none');
set(gca,'color','none');
set(gca,'FontSize', 12);
box off
ylabel('EPSC2/EPSC1');
xlabel('ISI (ms)');




%% amplitude of mossy fiber inputs (mean of first EPSC for 20 ms trains)
amp=[13.675
88.317
87.59944
31.316
44.288
89.65
35.457];
jitt=rand(numel(amp),1)/2;

figure;
temp=gca

s=scatter(jitt-0.25+ones(size(amp)),amp,90'.','filled');
set(gcf,'Position',[2275 63 120 420])
s.MarkerFaceColor=[199 34 22]/255;
s.MarkerFaceAlpha=0.5
Ytick2=temp.YLim(2);

ylim([0 Ytick2]);
set(gca, 'YTick', [0:Ytick2/3:Ytick2 ]);
yticklabels({0,'','',Ytick2})
xlim([0.5 1.5])
set(gca, 'XTick', []);
ylabel('EPSC size (pA)')
hold on
plot([ 0.75 1.25],[mean(amp) mean(amp)],'color',[199 34 22]/255,'linewidth',2)
set(gcf,'color','none');
set(gca,'color','none');


%% Do same summary plot for PF amplitudes
amp2=[
-70.28623333
-56.90261667
-88.99043611
-294.6875
-105.8555333
-58.84118333];

jitt=rand(numel(amp2),1)/2;

figure;

temp=gca

s=scatter(jitt-0.25+ones(size(amp2)),abs(amp2),90'.','filled');
set(gcf,'Position',[2275 63 120 420])
s.MarkerFaceColor=[212 170 0]/255;
s.MarkerFaceAlpha=0.5
Ytick2=temp.YLim(2);

ylim([0 Ytick2]);
set(gca, 'YTick', [0:Ytick2/3:Ytick2 ]);
yticklabels({0,'','',Ytick2})
xlim([0.5 1.5])
set(gca, 'XTick', []);
ylabel('EPSC size (pA)')
hold on
plot([ 0.75 1.25],[abs(mean(amp2)) abs(mean(amp2))],'color',[212 170 0]/255,'linewidth',2)
set(gcf,'color','none');
set(gca,'color','none');

%% Make PPR plot for PF
PF=[1.975123481	1.654692534	1.535657682	1.2092518	1.118658732	0.88231763
1.89980042	3.361853651	2.346426635	1.053554155	0.684517564	0.581373118
1.394036301	1.58150282	1.060474616	1.088685241	nan	0.868373691
1.249941938	1.151715898	1.168197398	1.067252018	0.997116344	0.972414906
1.878947697	1.731095054	1.432605858	1.059868217	0.724155198	1.211954067
1.734219203	1.736142102	1.644164579	1.316521127	1.323267035	0.897487815];

ISI3=[10 20 50 100 200 500];

figure;
plot(ISI3,nanmean(PF,1),'color',[212 170 0]/255, 'linewidth',2)
hold on
plot(ISI3,(PF'),'color',[0 0 0 0.5]);

PF2=[1.449780394	1.626490286	1.443801949	1.470398194	1.112089368	1.049109646
nan	1.92	1.163	1.181	1.039		0.89
1.71	1.617	1.4611	1.3088	1.36		0.88]

ISI4=[10 20 30 50 100 500];


% fuck this is a mess
PFcomp=[1.975123481	1.654692534	1.535657682	1.2092518	1.118658732	0.88231763
1.89980042	3.361853651	2.346426635	1.053554155	0.684517564	0.581373118
1.394036301	1.58150282	1.060474616	1.088685241	nan	0.868373691
1.249941938	1.151715898	1.168197398	1.067252018	0.997116344	0.972414906
1.878947697	1.731095054	1.432605858	1.059868217	0.724155198	1.211954067
1.734219203	1.736142102	1.644164579	1.316521127	1.323267035	0.897487815
1.449780394	1.626490286	1.470398194	1.112089368	nan	1.049109646
nan	1.92	1.181	1.039	nan	0.89
1.71	1.617	1.3088	1.36	nan	0.88];

ISIcomp=[10 20 50 100 200 500];
figure;
plot(ISIcomp,nanmean(PFcomp,1),'color',[212 170 0]/255, 'linewidth',2)
hold on
plot(ISIcomp,(PFcomp'),'color',[0 0 0 0.5]);
















temp=gca;
ylim([0 temp.YLim(2)]);
xlim([0 500]);
Ytick2=temp.YLim(2);
% set(gca, 'YTick', [0:1:Ytick2 ])
set(gca, 'YTick', [0:Ytick2/3:Ytick2 ]);
yticklabels({0,'','',Ytick2})
set(gca, 'XTick', [10 20 50 100 200 500])
set(gcf,'color','none');
set(gca,'color','none');
set(gca,'FontSize', 12);
box off
ylabel('EPSC2/EPSC1');
xlabel('ISI (ms)');



